package org.lc.kcjxzj.repository;

import java.util.List;

import org.lc.kcjxzj.model.Result;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface ResultRepository extends JpaRepository<Result, Long>, JpaSpecificationExecutor<Result> {
    
    @Modifying
    @Query(nativeQuery = true,
           value = "INSERT INTO result (jxff_similarity1, xcxfx_similarity1, sjfx_similarity1, cjfx_similarity1, zj_similarity1, yjjy_similarity1, "
                 + "jxff_similarity2, xcxfx_similarity2, sjfx_similarity2, cjfx_similarity2, zj_similarity2, yjjy_similarity2, "
                 + "jxff_similarity3, xcxfx_similarity3, sjfx_similarity3, cjfx_similarity3, zj_similarity3, yjjy_similarity3, "
                 + "jxff_similarity4, xcxfx_similarity4, sjfx_similarity4, cjfx_similarity4, zj_similarity4, yjjy_similarity4, "
                 + "zj_a_id, zj_b_id) "
                 + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
    void bulkInsert(List<Result> results);
}